import { $t } from '@vben/locales';

// 表单配置项
export const formColumns = [
  {
    type: 'seq',
    width: 50,
  },
  {
    field: 'name',
    title: '名称',
  },
  {
    field: 'operation',
    title: $t('sys.menu.operation'),
    width: 300,
    slots: { default: 'operationslot' },
  },
];
export const schema = [
  {
    component: 'Input',
    fieldName: 'name',
    label: $t('sys.position.name'),
    rules: 'required',
  },
  {
    component: 'Input',
    componentProps: {
      clearable: true,
    },
    fieldName: 'sort',
    label: $t('sys.role.sort'),
    rules: 'required',
  },
  {
    component: 'Input',
    fieldName: 'code',
    label: $t('sys.position.code'),
    rules: 'required',
  },
  {
    component: 'Input',
    fieldName: 'remark',
    componentProps: {
      type: 'textarea',
      rows: 4,
      maxlength: 200,
      showWordLimit: true,
    },
    label: $t('sys.role.remark'),
  },
  {
    component: 'RadioGroup',
    defaultValue: '1',
    componentProps: {
      isButton: true,
      options: [
        {
          label: $t('sys.role.start'),
          value: '1',
        },
        {
          label: $t('sys.role.stop'),
          value: '0',
        },
      ],
    },
    fieldName: 'status',
    label: $t('sys.role.status'),
  },
];
